package cxf.study;

import org.springframework.stereotype.Component;

import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * Created by woais_000 on 2015/11/22.
 */
@WebService
@Path("/hello")
@Component("helloWorld")
public class HelloWorldImpl implements HelloWorld  {


    public String sayHi(@WebParam(name="name")String name) {
        return name;
    }

    @GET
    @Produces({MediaType.APPLICATION_JSON })
    @Path("/get/{name}")
    public String sayRest(@PathParam("name")String name) {
        return name;
    }
}
